class Solution {
public:
    bool repeatedSubstringPattern(string s) {
     return (s + s).find(s, 1) != s.size();
    }
};
